package com.evil.common.log.util;

import com.evil.common.log.constant.LogConstant;
import org.apache.commons.lang3.StringUtils;

/**
 * @author liyang
 * @date 2022-08-08 00:00
 */
public class LogUtil {

    public static String interceptContent(String content) {
        if (StringUtils.isBlank(content)) {
            return content;
        }

        if (content.length() > LogConstant.MAX_LOG_CHARACTER_LENGTH) {
            content = content.substring(0, LogConstant.MAX_LOG_CHARACTER_LENGTH);
        }
        return content;
    }
}
